package com.zb.vo;

import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/9/27 0027
 **/
@Data
@ApiModel("工单客服分派策略条件对象")
public class WorkClientStrategyConditionVo {
    @ApiModelProperty(value = "工单客服分派规则条件ID，新增不必传，修改必传")
    private Long id;

    @NotNull(message = "条件类型参数不能为空")
    @NumberPattern(regexp = "^(1|2|3|4|)$", message = "条件类型参数不合法")
    @ApiModelProperty(value = "条件类型：1-品牌，2-商品分类，3-客户区域，4-工单模块", required = true, example = "1")
    private Integer type;

    @NotNull(message = "规则条件不能为空")
    @NotEmpty(message = "规则条件不能为空")
    @Size(min = 1, message = "规则条件至少填写一项")
    @ApiModelProperty(value = "工单客服分派策略条件子级对象", required = true)
    private List<WorkClientStrategyConditionChildVo> conditionChildVos;

}
